#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int n(int x)
{
	int y = 0;
	int o = 1;
	for (y = 1; y <= x; y++)
	{
		o = o * y;
	}
	return o;
}
int main()
{
	int i = 0;
	scanf("%d", &i);
	printf("%d", n(i));
	return 0;
}